/**
 * Created by user on 2014/7/25.
 */
function DataTable(tablecols){
    this.data = [];
    this.cols=[];
    if(tablecols){
        this.cols = tablecols;
    }
    this.addColumn = function(type,col){
        this.cols[this.cols.length] = col;
    }
    this.addRows = function(rows){
        for(var i in rows){
            this.data[i] = {};
            for(var j in rows[i]){
                this.data[i][this.cols[j]] = rows[i][j];
            }
        }
    }
    this.getDate = function(){
        return this.data;
    }
}

